<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>菜单按钮</title>
<link rel="stylesheet" type="text/css" href="${pageContext.servletContext.contextPath}/jquery-easyui/themes/default/easyui.css">
<link rel="stylesheet" type="text/css" href="${pageContext.servletContext.contextPath}/jquery-easyui/themes/icon.css">
<script type="text/javascript" src="${pageContext.request.contextPath}/jquery-easyui/jquery.min.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/jquery-easyui/jquery.easyui.min.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/jquery-easyui/locale/easyui-lang-zh_CN.js"></script>
</head>
<body>
  <a href="javascript:void(0)" id="edit">编辑</a>
  <div id="menubutton" style="width: 150px">
    <div data-options="iconCls: 'icon-large-chart'">菜单项1</div>
    <div>菜单项2</div>
    <div>菜单项3</div>
    <div class="menu-sep"></div>
    <div>菜单项4</div>
    <div>菜单项5</div>
  </div>
</body>
<script type="text/javascript">
$(function () {
  //禁用菜单按钮
  //$("#edit").menubutton("disable");
  //启用菜单按钮
  //$("#edit").menubutton("enable");
  //销毁菜单按钮
  //$("#edit").menubutton("destroy");
  $("#edit").menubutton({
    //是否显示简易效果。默认值为true
    plain: false,
    //对应菜单的选择器
    menu: '#menubutton',
    //鼠标划过按钮时显示菜单所持续的时间，默认值为100（单位：毫秒）
    duration: 150,
  });
})
</script>
</html>